1. Field of the Invention
This invention relates to a transaction processing method, a transaction control apparatus and a program thereof, and more specifically to a transaction processing method, a transaction control apparatus and a program thereof for improving the throughput of the transaction processing of the entire system in the transaction processing in which a database (DB) distributed to a plurality of servers is processed.
2. Description of the Related Art
There is a distributed transaction technology for processing a database of a plurality of servers in one transaction processing (for example, Japanese Patent Application Laid-Open No. 7-262073). In the conventional distributed transaction processing system, when a requested transaction (referred to as a global transaction) is processed, a main server requests one or more other servers to perform processing, and each of the requested servers perform requested processing, thereby performing transaction control in a 2-phase commitment system.
FIG. 22 shows the conventional distributed transaction technology including a server D 400, a server E 401, a server F 402, a server G 403, a message 104 which requests transaction processing, a process (hereinafter referred to as an executing process) 410 which performs transaction processing in the server D 400, an executing process 411 in the server E 401, a database (DB) 412 in the server E 401, an executing process 413 in the server F 402, a database 414 in the server F 402, an executing process 415 in the server G 403, and a database 416 in the server G 403.
Further, a global transaction 500 is processed in the executing process 410. Local transactions 501, 502 and 503 are individual transactions for performing processing assigned to the respective servers, and are processed in the executing processes 411, 413 and 415, respectively.
As shown in FIG. 22, the executing process 410 in the server D 400 receives the message 104, distributes necessary processing to the server E 401, the server F 402, and the server G 403 in the global transaction 500, performs the processing as a local transaction in each server, and receives a processing result from each server.
For example, the executing process 410 in the server D 400 receives the message 104, starts the global transaction 500, and requests the executing process 411 in the server E 401 to perform transaction processing using a processing request instruction (call E) when it is necessary to access the database 412 stored in the server E 401 (step S100). The executing process 411 accesses the database 412 by the local transaction 501, and returns the processing result to the executing process 410 (step S101).
Similarly, the executing process 410 requests the executing process 413 in the server F402 and the executing process 415 in the server G 403 to perform transaction processing using, for example, “call F” and “call G”, respectively (steps S102 and S104). And then, the executing process 410 receives a processing result of the local transaction 502 from the executing process 413, and receives a processing result of the local transaction 503 from the executing process 415 (steps S103 and S105).
The executing process 410 in the server D 400 receives a processing result from all executing processes (executing processes 411, 413 and 415) which are requested to perform transaction processing, and issues a commit command to each of the executing processes 411, 413 and 415 when the processing of all local transactions has been normally completed, thereby performing commitment.
On the other hand, based on the receipt of the processing result, when the executing process 410 in the server D 400 detects that an abnormal condition has occurred during the processing of the local transaction by any of the executing processes 411, 413 and 415, then the executing process 410 issues a rollback command to the executing processes 411, 413 and 415, thereby performing rollback.
When a series of processing is completely performed (after commitment or rollback) by the executing processes 411, 413 and 415, the executing process 410 is released.
In the above-mentioned conventional technology, the executing process of each server is not released until a series of processes of the related servers are all completed (commitment or rollback). For example, in FIG. 22, the executing process 410 in the server D400 is not released until the local transaction processing in each executing process in the servers E and F is committed or rolled back, and cannot start new transaction processing all that while.
Therefore, in the conventional technology, the multiprocessing level of the transactions cannot be enhanced, and the throughput of the entire system cannot be improved. Especially, with an increasing number of servers related to the processing, the processing time (time required to release the executing processes) of the executing process is prolonged, thereby causing the problem that the throughput of the entire system is lowered.